package com.ocp.socket.common;

import java.math.BigDecimal;

/**
 * @Author : lichong
 * @description :
 * @Date Create in 21:21 2019/3/9
 * @Modified By :
 **/
public class Constants {

    /**
     * 设备类型 app
     */
    public static String DEVICE_TYPE_APP = "APP";

    /**
     * 设备类型 硬件
     */
    public static String DEVICE_TYPE_DEVICE = "DEVICE";

    /**
     * 数据合法
     */
    public static String RETURN_CODE_SUCCESS = "0";

    /**
     * 数据不合法
     */
    public static String RETURN_CODE_FAIL = "1";

    /**
     * session的Attribute 里对应的认证信息key
     */
    public static String ATTRIBUTE_KEY_AUTH = "auth_info";

    /**
     * session的Attribute里对应上传有效数据数量key
     */
    public static String ATTRIBUTE_KEY_VALID_CONNECT_NUM = "valid_connect_num";

    /**
     * 指定的数量才视为正常连接
     */
    public static final int NORMAL_CONNECT_NUM = 10;

    /**
     * 气压，温度等设备的session的过期时间 为50s
     */
    public static long EXPIRE_TIME_SORT = 50 * 1000;

    /**
     * 挤奶清洗、制冷、真空泵、电磁阀等设备过期时间 为5min
     */
    public static long EXPIRE_TIME_LONG = 5 * 60 * 1000;

    /**
     * 设备报警的配置信息
     */
    public static String WARN_CFG_FLAG_VALUE = "1";
    public static String WARN_CFG_FLAG_NEED = "2";

    /**
     * 初始化一条服务器启动的时间
     */
    public static final long SERVER_START_TIME = System.currentTimeMillis();

    /**
     * 服务器启动后的60秒前不检测断开的心跳
     */
    public static final long NOT_CHECK_STOP_HEART_TIME = 60 * 1000;

    public static final BigDecimal BASE_AIRP = new BigDecimal(110);


    /**
     * 推送记录
     */
    public static final int PUSH_STATUS_INIT = 0;
    public static final int PUSH_STATUS_SUCCESS = 1;
    public static final int PUSH_STATUS_FAIL = 2;

    /**
     * 定时报警的时长, 单位分钟
     */
    public static final int NO_1_COOL_MAC_NOT_RUNNING = 1;  //W014
    public static final int NO_1_COOL_MAC_NOT_STOP = 1;     //W015
    public static final int NO_2_COOL_MAC_NOT_RUNNING = 1;  //W017
    public static final int NO_2_COOL_MAC_NOT_STOP = 1;     //W018

    /**
     * 用户免打扰的设置
     */
    public static final int USER_IF_SEND_MSG_IGNORE = 0;
    public static final int USER_IF_SEND_MSG_SEND = 1;
}
